package com.imooc.utils;

import com.imooc.VO.ResultVO;

public class ResultVOUtils {
    public static ResultVO success(Object object){
        ResultVO vo = new ResultVO();
        vo.setCode(0);
        vo.setMsg("成功");
        vo.setData(object);
        return vo;
    }
    public static ResultVO success(){
        return success(null);
    }
    public static ResultVO error(Integer code, String msg){
        ResultVO vo = new ResultVO();
        vo.setCode(code);
        vo.setMsg(msg);
        return vo;
    }
}
